package zyc.dao.imple;

import zyc.dao.TeacherDao;
import zyc.pojo.Teacher;

/**
 * @description:
 * @author: Code-zyc
 * @date: Created in 2020/12/24 8:31
 * @version: v1.0
 * @modified By:
 */
public class TeacherDaoImple extends BaseDao implements TeacherDao {
    @Override
    public Teacher getTeacherByNamePass(String name, String password) {
        String sql="SELECT * FROM teacher WHERE NAME=? AND PASSWORD=?";
        return selectForOne(Teacher.class,sql,name,password);
    }

    @Override
    public Teacher getTeacherBytidPass(int tid, String password) {
        String sql="SELECT * FROM teacher WHERE tid=? AND PASSWORD=?";
        return selectForOne(Teacher.class,sql,tid,password);
    }
}
